package com.black.carbon.controller;


import com.black.carbon.entity.Introduce;
import com.black.carbon.service.IntroduceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
public class IntroduceController {
    @Autowired
    IntroduceService introduceService;

    @GetMapping("/findIntroduceById/{id}")
    public Introduce findIntroduce(@PathVariable String id){
        return introduceService.findById(id);
    }


    @PostMapping(value = "/updateIntroduce", produces = "application/json;charset=UTF-8")
    public Introduce updateIntroduce(@RequestBody Introduce introduce){
        introduceService.updateIntroduce(introduce);
        return null;
    }
}
